<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>17JOYS管理后台 - 添加模块</title>
<link href="../Public/images/skin.css" rel="stylesheet" type="text/css" />
<link href="../Public/css/17joys.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
table.admintable td.key{
	background-color:#F6F6F6;
	border-bottom:1px solid #E9E9E9;
	border-right:1px solid #E9E9E9;
	color:#666666;
	font-weight:bold;
	text-align:right;
	width:140px;
}
.button {
	border:1px solid #B6B3AF;
	padding:1px 4px 0;
	height:21px;
}

input, select {
	border:1px solid silver;
	font-size:13px;
}
input.inputbox{
	width:180px;
}
span.red_font {
	color:red;
}
-->
</style>
<script type="text/javascript" src="__PUBLIC__/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
function onloadfun(){
	var fck=new FCKeditor('description');
	fck.BasePath="__PUBLIC__/fckeditor/";
	fck.Width="700";
	fck.Height="300";
	fck.ReplaceTextarea();
}
//window.onload=onloadfun;

function fnOnSubmit(form){
	var oeditor=FCKeditorAPI.GetInstance('description');
	oeditor.UpdateLinkedField();
}

		function allselections() {
			var e = document.getElementById('menuid');
				e.disabled = true;
			var i = 0;
			var n = e.options.length;
			for (i = 0; i < n; i++) {
				e.options[i].disabled = true;
				e.options[i].selected = true;
			}
		}
		function disableselections() {
			var e = document.getElementById('menuid');
				e.disabled = true;
			var i = 0;
			var n = e.options.length;
			for (i = 0; i < n; i++) {
				e.options[i].disabled = true;
				e.options[i].selected = false;
			}
		}
		function enableselections() {
			var e = document.getElementById('menuid');
				e.disabled = false;
			var i = 0;
			var n = e.options.length;
			for (i = 0; i < n; i++) {
				e.options[i].disabled = false;
			}
		}
		</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="../Public/images/mail_leftbg.gif"><img src="../Public/images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="../Public/images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">添加模块</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="../Public/images/mail_rightbg.gif"><img src="../Public/images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="../Public/images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2" valign="top">&nbsp;</td>
        <td>&nbsp;</td>
        <td valign="top">&nbsp;</td>
      </tr>
      <tr>
      <td>
      <div class="tip-msg ">
                提示: 带<span class="red_font">*</span>的项目为必填信息. 		
      </div>
      <form name="adminForm" action="__URL__/insert" method="post">
      <table class="admintable" id="admintable">
        <tr><td class="key">模块类型：</td><td>{$Think.get.module}</td></tr>
		<tr><td class="key">标题：</td><td><input type="text" name="title" /></td></tr>
		<tr>
		<td class="key">是否显示标题：</td>
		<td>
		是<input type="radio" name="showtitle" value="1" checked="checked" />
		否<input type="radio" name="showtitle" value="0" />
		</td>
		</tr>
		<tr>
		<td class="key">是否启用：</td>
		<td>
		是<input type="radio" name="published" value="1" checked="checked" />
		否<input type="radio" name="published" value="0" />
		</td>
		</tr>
		<tr>
		<td class="key">位置：</td>
		<td>
		<select name="position">
			<option value="top">top</option>
			<option value="right">right</option>
			<option value="left">left</option>
			<option value="foot">foot</option>
		</select>
		</td>
		</tr>
		<tr>
		<td class="key">访问级别：</td>
		<td>
		<select name="access">
			<option value="0">公开</option>
			<volist name="rlist" id="role">
			<option value="{$role['id']}">{$role['name']}</option>
			</volist>
		</select>
		</td>
		</tr>
		<tr>
		<td class="key" valign="top">菜单分配：</td>
		<td>
		<input id="menus-all" type="radio" name="menus" value="all" onclick="allselections();" checked="checked" />所有
		<!--  input id="menus-none" type="radio" name="menus" value="none" onclick="disableselections();" />无-->
		<input id="menus-select" type="radio" name="menus" value="select" onclick="enableselections();" />从列表中选择
		<br />
		<select id="menuid" name="menuid[]" multiple="multiple" size="20">
		<volist name="mlist" id="menu">
			<optgroup label="{$menu['title']}">
			<volist name="milist" id="menuitem">
			<eq name="menuitem['menuid']" value="$menu['id']">
				<option value="{$menuitem['id']}" selected="selected">
				<php>
				for($i=0;$i<$menuitem['marginnum']/5;$i++){
					echo "&nbsp;";
				}
				</php>
				{$menuitem['name']}</option>
			</eq>
			</volist>
			</optgroup>
		</volist>
		</select>
		<script>allselections();</script>
		</td>
		</tr>
		<tr>
		<td class="key" valign="top">参数:</td>
		<td>{:W($_GET['module'],array())}</td>
		</tr>
		<tr>
		<td>
		<input type="hidden" name="module" value="{$Think.get.module}" />
		<input type="submit" value="保存" />
		<input type="submit" value="应用" />
		<input class="button" type="button" onclick="history.go(-1);" value="取消" />
		</td>
		</tr>
		</table>
      </form>
      </td>
      </tr>
    </table>
    </td>
    <td background="../Public/images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="../Public/images/mail_leftbg.gif"><img src="../Public/images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="../Public/images/buttom_bgs.gif"><img src="../Public/images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="../Public/images/mail_rightbg.gif"><img src="../Public/images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
</body>
</html>